import request from '@/utils/request'

export function list (data) {
  return request({
    url: '/pc/knowledge/listByPage',
    method: 'post',
    data
  })
}

export function active (data) {
  return request({
    url: '/pc/knowledge/activity',
    method: 'post',
    data
  })
}

export function frozen (data) {
  return request({
    url: '/pc/knowledge/frozen',
    method: 'post',
    data
  })
}

export function knowledgeAdd (data) {
  return request({
    url: '/pc/knowledge/add',
    method: 'post',
    data
  })
}

export function knowledgeUpdate (data) {
  return request({
    url: '/pc/knowledge/update',
    method: 'post',
    data
  })
}

/**
 * 获取知识库详情，2024年10月2日07:50:55
 */
export function knowledgeDetail (id) {
  return request({
    url: '/pc/knowledge/detail/' + id,
    method: 'get'
  })
}

export function categoryList (data) {
  return request({
    url: '/h5/knowledgeType/listByPage',
    method: 'post',
    data
  })
}

export function categoryFrozen (data) {
  return request({
    url: '/h5/knowledgeType/frozen',
    method: 'post',
    data
  })
}

export function categoryActive (data) {
  return request({
    url: '/h5/knowledgeType/activity',
    method: 'post',
    data
  })
}

export function categoryAdd (data) {
  return request({
    url: '/h5/knowledgeType/add',
    method: 'post',
    data
  })
}

export function categoryUpdate (data) {
  return request({
    url: '/h5/knowledgeType/update',
    method: 'post',
    data
  })
}

/**
 * 知识库-类别，2024年9月29日16:35:33
 */
export function knowledgeTypeList (data) {
  return request({
    url: '/pc/knowledgeType/listByPage',
    method: 'post',
    data
  })
}
export function knowledgeTypeAdd (data) {
  return request({
    url: '/pc/knowledgeType/add',
    method: 'post',
    data
  })
}
export function knowledgeTypeUpdate (data) {
  return request({
    url: '/pc/knowledgeType/update',
    method: 'post',
    data
  })
}
export function knowledgeTypeActive (data) {
  return request({
    url: '/pc/knowledgeType/activity',
    method: 'post',
    data
  })
}
export function knowledgeTypeFrozen (data) {
  return request({
    url: '/pc/knowledgeType/frozen',
    method: 'post',
    data
  })
}

/**
 * 知识库-分类，2024年9月29日16:35:33
 */
export function knowledgeCategoryList (data) {
  return request({
    url: '/pc/knowledgeCategory/listByPage',
    method: 'post',
    data
  })
}
export function knowledgeCategoryAdd (data) {
  return request({
    url: '/pc/knowledgeCategory/add',
    method: 'post',
    data
  })
}
export function knowledgeCategoryUpdate (data) {
  return request({
    url: '/pc/knowledgeCategory/update',
    method: 'post',
    data
  })
}
export function knowledgeCategoryActive (data) {
  return request({
    url: '/pc/knowledgeCategory/activity',
    method: 'post',
    data
  })
}
export function knowledgeCategoryFrozen (data) {
  return request({
    url: '/pc/knowledgeCategory/frozen',
    method: 'post',
    data
  })
}